package cn.buk.tms.flight.dao;

import cn.buk.common.sc.CommonSearchCriteria;
import cn.buk.tms.entity.misc.CustomerFlightDiscount;
import cn.buk.tms.entity.misc.FlightKeyCustomerPolicy;

import java.util.List;

/**
 * @author yfdai
 */
public interface KeyCustomerPolicyDao {

  /**
   * 保存大客户政策
   * @param keyCustomerPolicy
   * @return
   */
  int saveKeyCustomerPolicy(FlightKeyCustomerPolicy keyCustomerPolicy);

  /**
   * 通过条件查找
   * @param enterpriseId
   * @param sc
   * @return
   */
  List<FlightKeyCustomerPolicy> search(int enterpriseId, CommonSearchCriteria sc);

  /**
   * 查找指定航司的私有注册
   * @param enterpriseId 企业id
   * @param carrier 航司代码
   * @return 符合要求的私有政策列表
   */
  List<FlightKeyCustomerPolicy> search(int enterpriseId, String carrier);

  /**
   * 根据政策代码查找
   * @param enterpriseId
   * @param policyCode 政策代码
   * @return
   */
  FlightKeyCustomerPolicy searchFlightKeyCustomerPolicy(int enterpriseId, String policyCode);

  /**
   * 查找企业客户配置的机票优惠代码
   * @param enterpriseId
   * @param customerEnterpriseId
   * @param policyCode
   * @return
   */
  CustomerFlightDiscount searchCustomerFlightDiscount(int enterpriseId, int customerEnterpriseId, String policyCode);

  List<FlightKeyCustomerPolicy> searchFlightKeyCustomerPolicyByKeyCustomerNo(int enterpriseId, String keyCustomerNo);
}
